# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=yelp
pkgver=3.36.0
pkgrel=0
pkgdesc="Help browser for GNOME desktop"
url="https://wiki.gnome.org/Apps/Yelp"
arch="all"
license="GPL-2.0-or-later"
depends="dconf desktop-file-utils hicolor-icon-theme yelp-xsl"
makedepends="glib-dev itstool bzip2-dev gtk+3.0-dev libgcrypt-dev xz-dev
	libxml2-dev libxslt-dev sqlite-dev webkit2gtk-dev"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-lang"
source="https://download.gnome.org/sources/yelp/${pkgver%.*}/yelp-$pkgver.tar.xz"

prepare() {
	default_prepare
	sed 's|/usr/bin/sh|/bin/sh|' \
		-i build-aux/compile \
		-i build-aux/missing \
		-i build-aux/install-sh \
		-i build-aux/depcomp \
		-i build-aux/config.sub \
		-i build-aux/config.guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="533916c61f6c0c830ddd21533c4462bea8493c76246092b1d77fa145f29cda15ae01817a4ac680bdf61ed591513320faf48e0aa727567c677fdb0ad66b6fa0c8  yelp-3.36.0.tar.xz"
